package com.hjj.controller.template;

import com.powernode.commons.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


public abstract class BaseController<T> {

    /**
     * 添加 T类型
     */
    @RequestMapping("/add")
    public abstract Result addItem(T t);
    /**
     * 查询
     */
    @RequestMapping("/items")
    public abstract Result findByList();



    @RequestMapping("/del")
    public abstract Result delById(int id);


    /**
     * 根据id查询
     */
    @RequestMapping("/item")
    public abstract Result findById(int id);


    /**
     * 根据id查询
     */
    @RequestMapping("/edit")
    public abstract Result editById(T t);
}
